import HomeView from '../views/HomeView.vue'
import CommentList from '@/views/CommentList.vue'
import StarListContent from '@/views/StarListContent.vue'
import UserListContent from '@/views/UserListContent.vue'

export default [
  {
    path: '/',
    redirect: '/home' // 将根路径重定向到 /home
  },
  {
    path: '/home',
    name: 'home',
    redirect: '/home/comments',
    component: HomeView,
    children: [
      {
        path: 'comments',
        name: 'comments',
        component: CommentList,
        meta: {
          window: 'mainWindow'
        }

      },
      {
        path: 'users',
        name: 'users',
        component: UserListContent,
        meta: {
          window: 'mainWindow'
        }
      },
      {
        path: 'star',
        name: 'star',
        component: StarListContent,
        meta: {
          window: 'mainWindow'
        }
      },
    ]
  },
  {
    path: '/wechat-moments',
    name: 'wechatMoments',
    component: () => import(/* webpackChunkName: "wechatMoments" */ '@/views/moments-page.vue')
  },
  {
    path: '/voice-page',
    name: 'voice-page',
    component: () => import(/* webpackChunkName: "wechatMoments" */ '@/views/VoiceCall.vue')
  },
  {
    path: '/chat-records',
    name: 'chat-records',
    component: () => import(/* webpackChunkName: "wechatMoments" */ '@/views/ChatRecords.vue')
  },
  {
    path: '/friend-request',
    name: 'friend-request',
    component: () => import(/* webpackChunkName: "wechatMoments" */ '@/views/PushFriendsRequest.vue')
  },
  {
    path: '/test',
    name: 'test',
    component: () => import(/* webpackChunkName: "wechatMoments" */ '@/views/test.vue')
  }
]
